<?php

namespace App\Http\Controllers\Library;

use App\Jobs\LibraryExpire;
use App\Model\User;
use Illuminate\Http\Request;
use LibraryService;
use App\Http\Controllers\Controller;

class ReaderController extends Controller
{

    public function detail()
    {
        $user = \Auth::guard('wechat')->user();

        $reader = LibraryService::getReader($user->number);

        dispatch(new LibraryExpire($user->open_id, $reader));

        return $reader;
    }
}
